package com.blog.controller;
import com.blog.constant.Constant;
import com.blog.pojo.User;
import com.blog.response.ResponseResult;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author XiaoLin
 * @date 2021/2/19 17:17
 */
@Slf4j
@RestController
public class HelloController {

  @ApiOperation(value = "测试接口", notes = "根据用户名和用户密码", httpMethod = "POST"
  )
  @RequestMapping("/hello")
  public ResponseResult hello(String username){
   if ("admin".equals(username)){
     log.info("成功");
     return ResponseResult.SUCCESS();
   }else {
     log.info("失败");
     return ResponseResult.FAILED();
   }
  }
}
